<template>
	<view class="p-30 w-1 fl-s-c">
		<text class="c-33 fs-26">请绑定本人银行卡号</text>
		<view class="w-1 bg-ff br-15 o-h m-t-30">
			<view class="bb-solid p-30 fr-s-c">
				<text class="c-33 fs-26">真实姓名</text>
				<input type="text" v-model="form.name" class="flex-1 t-r m-l-20 fs-26" placeholder="请输入你的姓名" />
			</view>
			<view class="bb-solid p-30 fr-s-c">
				<text class="c-33 fs-26">银行卡号</text>
				<input type="idcard" maxlength="19" v-model.trim="form.account" class="flex-1 t-r m-l-20 fs-26"
					placeholder="请输入你的银行卡号" />
			</view>
			<view class="bb-solid p-30 fr-s-c">
				<text class="c-33 fs-26">银行</text>
				<input type="text" v-model.trim="form.bank_name" class="flex-1 t-r m-l-20 fs-26" placeholder="请输入银行名称" />
			</view>
			<view class="bb-solid p-30 fr-s-c">
				<text class="c-33 fs-26">开户行</text>
				<input type="text" v-model.trim="form.bank_deposit" class="flex-1 t-r m-l-20 fs-26"
					placeholder="请输入开户行" />
			</view>
			<view class="bb-solid p-30 fr-s-c">
				<text class="c-33 fs-26">手机号</text>
				<input type="number" v-model.trim="form.mobile" maxlength="11" class="flex-1 t-r m-l-20 fs-26"
					placeholder="请输入该银行卡的预留手机号" />
			</view>
			<view class="next-btn bg-main fs-32 fr-c c-ff" @click="toNext">确定</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				path: this.$path,
				ranges: [{
					name: '建行'
				}],
				currange: 0,
				form: {
					name: '',
					account: '',
					mobile: '',
					bank_name: '', // 银行名称
					bank_deposit: '', // 开户行
				},
				could: false,
			}
		},
		onLoad() {
			
		},
		onShow() {
			
		},
		methods: {
			toNext() {
				const values = Object.values(this.form);
				if (values.some(item => !item)) return uni.$u.toast('请完善银行卡信息');
				uni.$post({
					url: '/api/center/add_pmpayment',
					data: this.form,
				}).then(res => {
					getApp().tt(res.msg, 'success')
					// this.$lastVal('could',true)
					uni.$delayBack()
				})
			},
		}
	}
</script>

<style>
	page {
		background: #f8f8f8;
	}

	.next-btn {
		position: fixed;
		left: 50%;
		transform: translateX(-50%);
		bottom: 50rpx;
		width: 686rpx;
		height: 98rpx;
		background: #FF6064;
		border-radius: 56rpx 56rpx 56rpx 56rpx;
		opacity: 1;
		z-index: 9;
	}
</style>